Optimal. Leaf size=182 \[ 4 b n x-\frac {2 b n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {i b n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {i b n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 182, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2498, 327, 211,
2417, 4940, 2438, 209} \begin {gather*} -\frac {i b n \text {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {i b n \text {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {2 \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}+x \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )-2 x \left (a+b \log \left (c x^n\right )\right )-\frac {2 b n \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (d f x^2+1\right )+4 b n x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 211
Rule 327
Rule 2417
Rule 2438
Rule 2498
Rule 4940
Rubi steps
\begin {align*} \int \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \, dx &=-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-(b n) \int \left (-2+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f} x}+\log \left (1+d f x^2\right )\right ) \, dx\\ &=2 b n x-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-(b n) \int \log \left (1+d f x^2\right ) \, dx-\frac {(2 b n) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}\\ &=2 b n x-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {(i b n) \int \frac {\log \left (1-i \sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}+\frac {(i b n) \int \frac {\log \left (1+i \sqrt {d} \sqrt {f} x\right )}{x} \, dx}{\sqrt {d} \sqrt {f}}+(2 b d f n) \int \frac {x^2}{1+d f x^2} \, dx\\ &=4 b n x-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {i b n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {i b n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-(2 b n) \int \frac {1}{1+d f x^2} \, dx\\ &=4 b n x-\frac {2 b n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}-b n x \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-\frac {i b n \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+\frac {i b n \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 254, normalized size = 1.40 \begin {gather*} -2 a x+\frac {2 a \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}-2 b x \left (-n-n \log (x)+\log \left (c x^n\right )\right )+\frac {2 b \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (-n-n \log (x)+\log \left (c x^n\right )\right )}{\sqrt {d} \sqrt {f}}+a x \log \left (1+d f x^2\right )+b x \left (-n+\log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )-2 b d f n \left (\frac {x (-1+\log (x))}{d f}+\frac {i \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )}{2 d^{3/2} f^{3/2}}-\frac {i \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )}{2 d^{3/2} f^{3/2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.14, size = 643, normalized size = 3.53
method | result | size |
risch | \(x \ln \left (d f \,x^{2}+1\right ) a -2 \ln \left (c \right ) b x +i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x +\frac {2 a \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}+4 b n x +\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x \ln \left (d f \,x^{2}+1\right )}{2}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x \ln \left (d f \,x^{2}+1\right )}{2}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x \ln \left (d f \,x^{2}+1\right )}{2}-\frac {b n \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1+x \sqrt {-d f}\right )}{d f}+\frac {b n \sqrt {-d f}\, \ln \left (x \right ) \ln \left (1-x \sqrt {-d f}\right )}{d f}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-\frac {b n \sqrt {-d f}\, \dilog \left (1+x \sqrt {-d f}\right )}{d f}+\frac {b n \sqrt {-d f}\, \dilog \left (1-x \sqrt {-d f}\right )}{d f}+b \ln \left (c \right ) x \ln \left (d f \,x^{2}+1\right )+\frac {2 b \ln \left (c \right ) \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}+b \ln \left (d f \,x^{2}+1\right ) \ln \left (x^{n}\right ) x +\frac {2 b \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) \ln \left (x^{n}\right )}{\sqrt {d f}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-2 a x -\frac {2 b \arctan \left (\frac {x d f}{\sqrt {d f}}\right ) n \ln \left (x \right )}{\sqrt {d f}}-\frac {2 b n \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-2 b x \ln \left (x^{n}\right )+i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x -b n x \ln \left (d f \,x^{2}+1\right )-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \arctan \left (\frac {x d f}{\sqrt {d f}}\right )}{\sqrt {d f}}-i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x -\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x \ln \left (d f \,x^{2}+1\right )}{2}-i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x\) | \(643\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \log {\left (c x^{n} \right )}\right ) \log {\left (d f x^{2} + 1 \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________